{include file="public/_head" /}
<!-- Main Container -->
<div class="main-container container-fluid">
    <!-- Page Container -->
    <div class="page-container">

        <!-- Page Sidebar -->
        {include file="public/_left" /}
        <!-- /Page Sidebar -->
        <!-- Page Content -->
        <div class="page-content">
            <!-- Page Breadcrumb -->
            <div class="page-breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="fa fa-home"></i>&nbsp;日本留学
                    </li>
                    <li>留学优势</li>
                </ul>
            </div>
            <!-- /Page Breadcrumb -->
            <!-- Page Body -->
            <div class="page-body">
                <a href="{:url('admin/introduces/introduces_add')}" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i>&nbsp;添加留学优势</a>
                <div class="row">
                    <div class="col-xs-12">
                        <div class="widget">
                            <div class="widget-header">
                                <span class="widget-caption">留学优势列表</span>
                                <div class="widget-buttons">
                                    <ul class="pagination pagination-sm">
                                        {$in|replaces}
                                    </ul>
                                </div>
                            </div>
                            <div class="widget-body">
                                <table class="table table-hover table-bordered">
                                    <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>配图</th>
                                        <th>优势名称</th>
                                        <th style="width: 600px;">优势介绍</th>
                                        <th>添加时间</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    {volist name='in' id='v'}
                                    <tr >
                                        <td style="vertical-align: middle;">{$v.id}</td>
                                        <td style="vertical-align: middle;"><img style="width: 100px;height: 120px;" src="{$v.img}"></td>
                                        <td style="vertical-align: middle;">{$v.names}</td>
                                        <td style="vertical-align: middle;">{$v.motto}</td>
                                        <td style="vertical-align: middle;">{$v.create_time}</td>
                                        <td style="vertical-align: middle;">
                                            <a href="{:url('admin/introduces/introduces_edit',['id'=>$v.id])}" class="btn btn-azure btn-xs">编辑</a>
                                            <a href="#" class="btn btn-sm btn-danger" dataid="{$v.id}">删除</a>
                                        </td>
                                    </tr>
                                    {/volist}
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->

    </div>
    <!-- /Page Container -->
    <!-- Main Container -->

</div>

{include file="public/_js" /}
<script>
    $(function () {
        $('.btn-danger').click(function () {
            var id = $(this).attr('dataid');
            layer.confirm('确认删除该条信息吗？',{
                title:'操作状态',
                icon:3
            },function (index) {
                layer.close(index);
                $.ajax({
                    url:"{:url('admin/introduces/introduces_del')}",
                    type:'post',
                    data:{id:id},
                    dataType:'json',
                    success:function (data) {
                        if (data.code == 1){
                            layer.msg(data.msg,{
                                icon:6,
                                time:1000
                            },function () {
                                location.href = data.url;
                            });
                        } else {
                            layer.open({
                                title:'操作设置',
                                content:data.msg,
                                icon:5,
                                anim:6
                            });
                        }
                    }
                });
            });
            return false;
        });
    });



</script>
</body>
<!--  /Body -->
</html>

